﻿using ClownFish;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;
using THL.DataAccess.Models;

namespace THL.DataAccess
{
    public class BaseDataProvider
    {
        public readonly String DbName;
        public readonly String ProviderName;
        public readonly String ConnectionString;
        public BaseDataProvider()
        {
            ConnectionStringSettingsCollection connectionCollection = ConfigurationManager.ConnectionStrings;
            DbName = connectionCollection[1].Name;
            ProviderName = connectionCollection[1].ProviderName;
            ConnectionString = connectionCollection[1].ConnectionString;
        }
    }

    public interface IDataProvider
    {
        List<StockRecord> TestConnection();
        List<StockRecord> GetStockList();
        ZiJingLiuXiangRecord GetZJLX(Int32 stockId, DateTime jyrq);

        Int32 CreateZJLX(ZiJingLiuXiangRecord newZJLX);

        Int32 UpdateZJLX(ZiJingLiuXiangRecord newZJLX, ZiJingLiuXiangRecord oldZJLX);

        HQRecord GetHQ(int p, DateTime dateTime);

        Int32 CreateHQ(HQRecord hQRecord);

        Int32 UpdateHQ(HQRecord hQRecord);
    }
}
